<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>修改用户信息</title>
</head>
<body>
<%
    ArrayList userInfo = (ArrayList) request.getAttribute("userInfo");
    if (userInfo != null && userInfo.size() > 0) {
%>
<a href="${pageContext.request.contextPath}/admin/index.jsp">返回主页</a>
<c:forEach items="${requestScope.userInfo}" var="userInfo">
    <form method="post" id="form1" name="form1" action="${pageContext.request.contextPath}/admin/deal/user_mod.jsp">
        <table>
            <tr>
                <td colspan="2">
                    <label>修改用户</label>
                </td>
            </tr>
        </table>
        <label style="display: none">
            用户ID：
            <input type="number" name="id" value="${userInfo.id}"/>
        </label><br>
        <label>
            邮箱：
            <input type="text" name="email" value="${userInfo.email}"/>
        </label><br>
        <label>
            用户名：
            <input type="text" name="username" value="${userInfo.username}"/>
        </label><br>
        <label>
            密码：
            <input type="text" name="password" value="${userInfo.password}"/>
        </label><br>
        <label>
            状态：
            <input type="number" name="state" value="${userInfo.state}"/>
        </label><br>
        <input type="submit" value="提交">
    </form>
</c:forEach>
<%
    }
%>
</body>
</html>